package pl.myapp.webtest.asynchronous.business;

import org.slf4j.Logger;
import pl.myapp.webtest.config.qualifier.MyLogger;

import javax.ejb.Asynchronous;
import javax.ejb.Stateless;
import javax.inject.Inject;

/**
 * Created by IntelliJ IDEA.
 * User: kaafaar
 * Date: 16.05.11
 * Time: 23:30
 * To change this template use File | Settings | File Templates.
 */
@Stateless
public class StatelessAsynch {

    @Inject
	@MyLogger
    Logger logger;


    @Asynchronous
    public void testAsynch() {
        try {
            Thread.sleep(16000);
            logger.info("asynch ok");
        }
        catch(Exception e) {
            logger.error("insomnia");
        }
    }
}
